<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2024/1/12
  Time: 10:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>application作用域</title>
</head>
<body>
<%
    List<String> books = new ArrayList<String>();
    books.add("《三国演义》");
    books.add("《西游记》");
    books.add("《水浒传》");
    books.add("《西游记》");
    application.setAttribute("books",books);
    // request.getRequestDispatcher("/scope/list.jsp").forward(request,response);
    response.sendRedirect("/scope/list.jsp");
%>
<%--application作用域： 代表整个应用程序都有效，只有应用程序不关闭，可以在任意位置访问数据！--%>
</body>
</html>
